VERSION 5.00
Begin VB.UserControl ViListBox 
   ClientHeight    =   3600
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   4800
   ScaleHeight     =   3600
   ScaleWidth      =   4800
   Begin VB.ListBox List2 
      Height          =   2040
      Left            =   2520
      TabIndex        =   1
      Top             =   840
      Width           =   1215
   End
   Begin VB.ListBox List1 
      Height          =   2040
      Left            =   720
      TabIndex        =   0
      Top             =   600
      Width           =   1215
   End
End
Attribute VB_Name = "ViListBox"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

Public Event Click(ByVal Title As String, ByVal Data As String, index As Long)

Public Enum EnumListColumnListBox
    ListTitle
    ListData
    ListIndex
End Enum

Private Sub List1_Click()
    List2.ListIndex = List1.ListIndex
    RaiseEvent Click(List1.Text, List2.Text, List2.ListIndex)
End Sub




Private Sub UserControl_Resize()
    List2.Visible = False
    List1.Move 0, 0, width, height
End Sub

Public Function Add(ByVal Data As String, Optional ByVal Title As String, Optional index) As Boolean
    If Title = "" Then Title = Data
    List1.AddItem Title, index
    List2.AddItem Data, index
    Add = True
End Function
